from sqlmodel import SQLModel, Field, Index
from datetime import datetime

class WpWallet(SQLModel, table=True):
    """Waveup钱包表数据库模型"""
    __tablename__ = "t_wp_wallet"  # 对应数据库表名

    id: int = Field(default=None, primary_key=True, description="主键ID")
    uid: int = Field(default=0, description="用户ID")
    productId: str = Field(default="", max_length=64, description="藏品编号")
    assetAmount: float = Field(default=0.0, description="资产余额")
    productName: str = Field(default="", max_length=128, description="藏品名称")
    imageUrl: str = Field(default="", max_length=256, description="藏品图片URL")
    createdAt: datetime = Field(default_factory=datetime.now, description="创建时间")
    updatedAt: datetime = Field(default_factory=datetime.now, description="更新时间")